package mianxiangduixiang.Test6.T2;

import java.util.*;

/**
 * @Author JetZhang
 * @Date 2021/11/4
 */
public class Test2 {
    public static void main(String[] args) {
        LinkedList<Book> linkedList = new LinkedList<>();
        ArrayList<Book> arrayList = new ArrayList<>();
        HashSet<Book> hashSet = new HashSet<>();
        HashMap<Integer, Book> bookHashMap = new HashMap<>();
        for (int i = 0; i < 10; i++) {
            linkedList.add(new Book(i + "test", i + "test", i + "test"));
            arrayList.add(new Book(i + "test", i + "test", i + "test"));
            hashSet.add(new Book(i + "test", i + "test", i + "test"));
            bookHashMap.put(i,new Book(i + "test", i + "test", i + "test"));
        }
        Iterator iterator = hashSet.iterator();
        for (int i = 0; i < 10; i++) {
            System.out.println(linkedList.get(i).toString());
            System.out.println(arrayList.get(i).toString());
            System.out.println(iterator.next().toString());
            System.out.println(bookHashMap.get(i).toString());
            System.out.println();
        }

    }
}
